package com.atung.dao;

import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.UpdateProvider;

import com.atung.model.BusSchoolBusPayment;
import com.atung.provider.BusSchoolBusPaymentProvide;

@Mapper
public interface BusSchoolBusPaymentDAO {

	
	@Select("select * from bus_school_bus_payment where id=#{platformId}")
	BusSchoolBusPayment selectBusSchoolBusPaymentById(@Param("platformId")Long platformId);
	
	@Select("select * from bus_school_bus_payment where platform_order_number=#{platformOrderNumber} and order_status=201")
	BusSchoolBusPayment selectBusSchoolBusPaymentByPlatformOrderNumber(@Param("platformOrderNumber")String platformOrderNumber);
	
	
	@InsertProvider(type=BusSchoolBusPaymentProvide.class,method="saveBusSchoolBusPaymentProvider")
	Boolean saveBusSchoolBusPayment(BusSchoolBusPayment busSchoolBusPayment);
	
	
//	/**
//	 * 根据用户编号和订单字符编号 获取订单信息
//	 * @param openId
//	 * @param platformOrderNumber
//	 * @return
//	 */
//	@Select("select * from bus_school_bus_order where open_id=#{openId} and platform_order_number=#{platformOrderNumber} "
//			+ " and order_status=201")
//	BusSchoolBusPayment selectBusSchoolBusOrderByopenIdAndPlatformOrderNumber(@Param("openId")String openId,@Param("platformOrderNumber")String platformOrderNumber);

	@UpdateProvider(type=BusSchoolBusPaymentProvide.class,method="updateBusSchoolBusPaymentProvider")
	Boolean updateBusSchoolBusPayment(BusSchoolBusPayment busSchoolBusPayment);




}
